<?php

/**
 * @package Nina
 * @author John Main <john@thedaddy.org>, Andrew Rose <rose.andrew@gmail.com>
 */
class Nina_Db_Driver_Result_Mysqli implements Nina_Db_Driver_Result
{
	private $dbcon;
	private $result;

	public function __construct($dbcon) {
		$this->dbcon = $dbcon;
	}
	
	public function setResult($result) {
		$this->result = $result;
	}

	public function count() {
		return $this->result->num_rows;
	}

	public function affected() {
		return $this->dbcon->affected_rows;
	}

	public function row() {
		return $this->result->fetch_assoc();
	}
	
	public function seek($offset) {
		return $this->result->data_seek($offset);
	}
}